
var cboDoiXeID_cars_new_Change=function()
{
  
    var cboHangXeID= document.getElementById("cboHangSX_cars_new");
    cmd_search_cars_new_doixe([{name: 'HangXeID', value: '' + cboHangXeID.value + ''}]);  
};

var cboDoiXeID_cars_used_Change=function()
{
    
    var cboHangXeID= document.getElementById("cboHangSX_cars_used");
  
    cmd_search_cars_used_doixe([{name: 'HangXeID', value: '' + cboHangXeID.value + ''}]);  
};

var cboHangSX_cars_specific_Change=function()
{
  
    var cboHangXeID= document.getElementById("cboHangSX_cars_specific");
  
    cmd_search_cars_Specific_doixe([{name: 'HangXeID', value: '' + cboHangXeID.value + ''}]);  
};




var Search_cars_new_Click=function()
{
    var loaiXe="";
    if($("#li_Cars").attr("class").toString()==="active")
       loaiXe=1;
   else
       loaiXe=2;
    
    
     var HangXeID= document.getElementById("cboHangSX_cars_new").value;
     var DoiXeID= document.getElementById("cboDoiXeID_cars_new").value;
     var GiaCaoNhat= document.getElementById("cboMaxPrice_cars_new").value;
     var TinhID= document.getElementById("cboTinhID_cars_new").value;
     
     
     Search_Cars_New([{name: 'HangXeID', value: '' + HangXeID + ''}
            ,{name: 'DoiXeID', value: '' + DoiXeID + ''}
            ,{name: 'GiaCaoNhat', value: '' + GiaCaoNhat + ''}
            ,{name: 'LoaiXe', value: '' + loaiXe + ''}
            ,{name: 'TinhID', value: '' + TinhID + ''}
        ]);
};

var Search_cars_used_Click=function()
{
     var loaiXe="";
    if($("#li_Cars").attr("class").toString()==="active")
       loaiXe=1;
   else
       loaiXe=2;
   
     var HangXeID= document.getElementById("cboHangSX_cars_used").value;
     var DoiXeID= document.getElementById("cboDoiXeID_cars_used").value;
     var GiaCaoNhat= document.getElementById("cboMaxPrice_cars_used").value;
     var TinhID= document.getElementById("cboTinhID_cars_used").value;
     
     
     Search_Cars_Used([{name: 'HangXeID', value: '' + HangXeID + ''}
            ,{name: 'DoiXeID', value: '' + DoiXeID + ''}
            ,{name: 'GiaCaoNhat', value: '' + GiaCaoNhat + ''}
            ,{name: 'LoaiXe', value: '' + loaiXe + ''}
            ,{name: 'TinhID', value: '' + TinhID + ''}
        ]);
};



var Search_cars_dealer_Click=function()
{
 
     var HangXeID= document.getElementById("cboHangSX_cars_dealer").value;
     var TinhID= document.getElementById("cboTinhID_cars_dealer").value;
     
     
     Search_cars_dealer([{name: 'HangXeID', value: '' + HangXeID + ''}
            ,{name: 'TinhID', value: '' + TinhID + ''}
        ]);
};


var Search_cars_CheckValue_Click=function()
{
 
     var HangXeID= document.getElementById("cboHangSX_cars_CheckValue").value;
     var NamSanXuat= document.getElementById("cboNamSanXuat_cars_CheckValue").value;
     var SoKMDaDi= document.getElementById("cboSoKMDaDi_cars_CheckValue").value;
     
     
     Search_cars_CheckValue([{name: 'HangXeID', value: '' + HangXeID + ''}
            ,{name: 'NamSanXuat', value: '' + NamSanXuat + ''}
            ,{name: 'SoKMDaDi', value: '' + SoKMDaDi + ''}
        ]);
};



var Search_cars_Specific_Click=function()
{
    //alert(1);
     var HangXeID= document.getElementById("cboHangSX_cars_specific").value;
     var NamSanXuat= document.getElementById("cboNamSanXuat_cars_specific").value;
     var DoiXe= document.getElementById("cboDoiXeID_cars_specific").value;
     
     
     Search_Cars_Specific([{name: 'HangXeID', value: '' + HangXeID + ''}
            ,{name: 'NamSanXuat', value: '' + NamSanXuat + ''}
            ,{name: 'DoiXeID', value: '' + DoiXe + ''}
        ]);
};








var onclickChiTietBlog=function(idblog)
{
   ChiTiet_Blog(
           [{name: 'ID', value: '' + idblog + ''}]
       );
};






var cboTaiChinh_ChoVay_Change=function()
{
    
    var cboLoai= document.getElementById("cboLoai");
    var cboNganHang= document.getElementById("cboNganHang");
   
    
    TaiChinh_ChoVay_Change([
        {name: 'Loai', value: '' + cboLoai.value + ''}
        ,{name: 'NganHangID', value: '' + cboNganHang.value + ''}
    ]);  
    //alert(1);
    //updateSelectboxValue_ChoVay();
};

var updateSelectboxValue_ChoVay=function(){
	    $('select[value]').each(function(){
                alert(this.getAttribute("value"));
               //if(this.getAttribute("value")!==null && this.getAttribute("value").trim()!=="" && this.getAttribute("value").trim()!=="0")
                    $(this).val(this.getAttribute("value"));
	    });  
	};
